# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=kaidan
pkgver=0.9.1
pkgrel=4
pkgdesc='A user-friendly XMPP client for every device'
arch=(loong64 x86_64)
url='https://www.kaidan.im/'
license=(GPL3 MIT)
depends=(gcc-libs
         glibc
         kcoreaddons5
         kio5
         kirigami-addons5
         kirigami2
         kitemviews5
         knotifications5
         kquickimageeditor5
         libomemo-c
         qqc2-desktop-style5
         qt5-base
         qt5-declarative
         qt5-location
         qt5-multimedia
         qt5-quickcontrols2
         qt5-svg
         qxmpp-qt5
         zxing-cpp)
makedepends=(extra-cmake-modules
             qt5-tools)
source=(https://download.kde.org/unstable/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('8137011d5c36a11d23fcc600d4fd5b0767951d69cf21c8eaac43e98d1c918f90'
            'SKIP')
validpgpkeys=(03C2D10DC97E5B0BEBB8F3B44663231A91A1E27B) # Linus Jahn <lnj@kaidan.im>

build() {
  cmake -B build -S $pkgname-$pkgver
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  install -Dm644 $pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
